home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Canadian & World Encyclopedia 1998
/
The Canadian & World Encyclopedia 1998 - Disc 2.iso
/
mac
/
prime_CD
/
pb
/
PREVIEW.DIR
/
00154_Script_video manager
< prev
next >
Wrap
Text File
|
1997-07-22
|
3KB
|
100 lines
property pLastStartTimePtr, pClipList, pClipListCount
global gQTchan, gCursorStack, gTheSoundLevel, gDefaultVolume
on new me, clipList
set pLastStartTimePtr = 0
set pClipList = [:]
sort pClipList
do "set pClipList = " & clipList
set pClipListCount = count(pClipList)
return me
end
on roll me
-- set the soundlevel to gTheSoundLevel
set the volume of sprite gQTchan to gDefaultVolume
set the movieRate of sprite gQTchan = 1
return me
end
on cueNext me, transitionSpec
push gCursorStack
-- scan index for next clip
repeat with i = 1 to pClipListCount
set nextStartTime = getpropat(pClipList, i)
if nextStartTime > the movieTime of sprite gQTchan then exit repeat
end repeat
-- handle list wraparound for stop time
set the loop of the member of sprite gQTchan to FALSE
case true of
(i = pClipListCount):
-- set nextStartTime = getpropat(pClipList, pClipListCount+1)
set nextStopTime = the duration of the member of sprite gQTchan
nothing
(i > pClipListCount):
set nextStartTime = getpropat(pClipList, 1)
set nextStopTime = getpropat(pClipList, 2)
set the loop of the member of sprite gQTchan to TRUE
nothing
-- set nextStopTime = the duration of the member of sprite gQTchan
otherwise:
set nextStopTime = getpropat(pClipList, i+1)
end case
-- hold it
set the movierate of sprite gQTchan to 0
-- set in point
set the movieTime of sprite gQTchan = nextStartTime
-- roll it
set the movierate of sprite gQTchan to 1
-- set out point (optional)
-- set the stopTime of sprite gQTchan = nextStopTime
-- updatestage -- preroll(?)
puppettransition transitionSpec
pop gCursorStack
return me
end
on playQTClip me, startTime, stopTime, noVideoFlag
set the movierate of sprite gQTchan to 0
set inTime = startTime
set outTime = stopTime
-- if voidP(noVideoFlag) then
-- set the video of the member of sprite gQTchan to 1
-- else set the video of the member of sprite gQTchan to 0
if voidP(startTime) then
set inTime = 0
end if
if voidP(stopTime) then
set outTime = the duration of the member of sprite gQTchan
end if
-- set the soundlevel to gTheSoundLevel
set the volume of sprite gQTchan to gDefaultVolume
set the movietime of sprite gQTchan to inTime
set the movierate of sprite gQTchan to 1
set the stoptime of sprite gQTchan to outTime
return me
end